package com.yczlab.mybatis.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Getter
@Setter
@ToString
@EqualsAndHashCode
public class Employee implements Serializable {

    private static final long serialVersionUID = -8787905945975835581L;

    private Integer employeeId;

    private Integer managerId;

    private Integer departmentId;
    private Department department;//这个属性就会涉及到关联查询

    private String firstName;

    private String lastName;

    private Double salary;

    private Double commissionPct;

    private String email;

    private String phoneNumber;

    private String jobId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//前端传数据时需要
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")//从数据库度数据时需要
    private Date hireDate;
}
